﻿@model IEnumerable<RIS.TMP.WEB.APP.Models.CFBranch>

@{
    ViewBag.Title = "กำหนดสิทธิ : ข้อมูลสาขา";
}
@section Settings{
<h2 class="sub-header">กำหนดสิทธิ : ข้อมูลสาขา</h2>
    <p>
        @Html.ActionLink("Create New", "Create", new object { }, new { @class = "btn btn-primary" })
    </p>
<div class="table-responsive">
    <table id="table" class="table table-striped table-bordered table-hover" aria-describedby="table_info">
        <thead>
            <tr>
                <th>
                    @Html.DisplayName("ชื่อสาขา")
                </th>
                <th>
                    @Html.DisplayName("เพิ่มเติม")
                </th>
                <th class="center" style="width: 200px;"></th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr>
                    <td>
                        @Html.DisplayFor(modelItem => item.BrName)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Remarks)
                    </td>
                    <td>
                        @*<a href="@Url.Action("Edit", "CFBranch", new { id = item.BrId })"><span class="glyphicon glyphicon-floppy-disk"></span></a>*@
                        @Html.ActionLink("Edit", "Edit", new { id = item.BrId }) |
                        @Html.ActionLink("Details", "Details", new { id = item.BrId }) |
                        @Html.ActionLink("Delete", "Delete", new { id = item.BrId })
                    </td>
                </tr>
            }
        </tbody>
    </table>
    </div>
    }
@section scripts {
@Scripts.Render("~/Scripts/jquery.dataTables.min.js")
@Scripts.Render("~/Scripts/dataTables.bootstrap.js")
@*@Scripts.Render("~/Scripts/css/dataTables.bootstrap.css")*@
    <script type="text/javascript">
        $(".AF").show();
        $(document).ready(function () {
            $('#table').dataTable({
                "sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>"
            });
        });

        $.extend($.fn.dataTableExt.oStdClasses, {
            "sWrapper": "dataTables_wrapper form-inline"
        });
    </script>
}